function [ incidence_matrix ] = Weight2IncidenceMatrix( weight_matrix, pocet_hran )
% prevede matici vah na matici incidence
% TODO : zatim je to pouze pro neorientovane grafy !

n = size(weight_matrix,1); 
incidence_matrix = zeros( n, pocet_hran);

ah = 1; %aktualni hrana


for i=1:n   
    for j=i+1:n
    
    if ( weight_matrix(i,j) ~= Inf ) 
        incidence_matrix(i, ah) = 1;
        incidence_matrix(j, ah) = 1;
        ah = ah + 1;
    end
      
    end
end


end

 